
#include <vector>

class Tictactoe
{
    public:
        Tictactoe();
        ~Tictactoe();

        // Verifica se um jogador venceu o jogo
        bool playerWins( std::vector<int> board, int player );

        bool hasGameEnded( std::vector<int> board );

        int utility( std::vector<int> board );

        void printBoard( std::vector<int> board );

        void playerPlays( int player, int pos );

        int getTurn();

		void getBestMove( std::vector<std::pair<int, int> > moves, int player, int& bestMove, int& bestResult );

        int minimax( std::vector<int> brd );

        std::pair<int,int> max( std::vector<int> brd, int level, int pos );

        std::pair<int,int> min( std::vector<int> brd, int level, int pos );

        std::vector<int> getBoard();

    private:
        std::vector<int> _board;
        int _turn;
};
